package com.liu.mq.consumer.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.jms.TextMessage;

@Component
public class Topic_Consumer {


    @JmsListener(destination = "${myTopic}")
    public void receive(TextMessage text) throws Exception {
        System.out.println(text.getText());
    }
}
